#include <user.h>
#include <defs.h>
#include <ts7200.h>
#include <io.h>

void NameServer();
void TrainTxServer();
void TrainRxServer();
void IdleTask();

void UserInit() {
  int child_tid;
  child_tid = Create(4, &NameServer);
  Send(child_tid, NULL, 0, NULL, 0);
  child_tid = Create(5, &TrainTxServer);
  Send(child_tid, NULL, 0, NULL, 0);
  child_tid = Create(4, &TrainRxServer);
  Send(child_tid, NULL, 0, NULL, 0);
  Create(0, &IdleTask);

  int c;
  while (TRUE) {
    c = Getc(COM1);
    Putc(COM1, c);
  }
  
  Exit();
}
